From 964abf74235caa5cbeab64e845c4b35ac340b860 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 7 Nov 2014 17:16:59 +0100 Subject: [PATCH] wayland: Don't translate a NULL region into an empty one cairo_region_copy(NULL) will effectively return an empty region, as this function is always meant to return valid memory. This however inverts the meaning of the NULL region and results in entirely non-clickable windows. --- gdk/wayland/gdkwindow-wayland.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 96d9dc66d3..b49dda32fe 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1437,8 +1437,13 @@ gdk_window_wayland_input_shape_combine_region (GdkWindow *window, return; g_clear_pointer (&impl->input_region, cairo_region_destroy); - impl->input_region = cairo_region_copy (shape_region); - cairo_region_translate (impl->input_region, offset_x, offset_y); + + if (shape_region) + { + impl->input_region = cairo_region_copy (shape_region); + cairo_region_translate (impl->input_region, offset_x, offset_y); + } + gdk_wayland_window_sync_input_region (window); } -- 2.30.2